<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>
<script>
  //百钱白鸡。100只鸡100元，母鸡3元，公鸡5元，三只小鸡一元
  //a为母鸡，个数小于100只
  function getcount(dollar) {
    var count=0
    for (var a = 0; a < dollar; a++) {
      //b为公鸡，个数小于100只
      for (var b = 0; b < dollar; b++) {
        //c为小鸡，个数为100减去母鸡和公鸡的个数
        var c = dollar - a - b;
        //100以内，一个一个试，直到条件成立
        if (3 * a + 5 * b + c / 3 == dollar) {
            count++
        }
      }
    }
    return count
  }
  console.log(getcount(110))
</script>
